import Vue from "vue"
import Router from "vue-router"
import Login from "@/views/Login"

import auth from "@/views/auth/Index"
import test2 from "@/views/test2"
import test3 from "@/views/test3"
import test4 from "@/views/test4"
import home from "@/views/layout/Main"
Vue.use(Router)

export default new Router({
mode:'hash',
routes:[
		{
			path: '/login',
			name: 'Login',
			component: Login,
			meta:{
				title:"登录系统"
			},
			hidden:true

		},
		{
			path: '/home',
			name: '权限菜单',
			component: home,
			meta:{
				title:"权限菜单"
			},
			children:[
				{
					path: '/auth/Index',
					name: '权限列表',
					component: auth,
					meta:{
						title:"权限列表"
					},
					children:[

					]
				
				},


			]
		
		},
				{
					path: '/home',
					name: '测试3',
					component:home ,
					meta:{
						title:"测试"
					},
					children:[
						{
							path: '/test4',
							name: '测试4',
							component: test4,
							meta:{
								title:"测试4"
							}
						
						},
						// {
						// 	path: '/test2',
						// 	name: '测试2',
						// 	component: test2,
						// 	meta:{
						// 		title:"测试2"
						// 	}
						
						// },
					]
				
				},

	]

})

/*重置路由*/
export function resetRouter()
{
    const newRouter = createRouter()
    router.matcher = newRouter.matcher
}